<?php
class feedback_viewP extends SClass {

    public function process() {



        $post = ServiceUtils::GetFactory()->getFeedbackService()->getFeedbackAll();
        $a = array();
        while ($x = $post->getNext()) {
            $a[] = array(
                'id' => $x->getId(),
                'title' => $x->getTitle(),
                'content' => $x->getContent(),
                'postdate' => $x->getPostdate(),
                   'checked' =>  $x->getBlessed()==1?"ok":"НІ,чекаю на перевірку ",
                'user' => $x->getName(),
                 'publish' => Engine_LinkMaker::GetURLByContentID(
                    'controlpanel-feedback_Publish', $x->getId()),
                'edit' => Engine_LinkMaker::GetURLByContentID(
                    'controlpanel-feedback_edit', $x->getId()),
                'delete' => Engine_LinkMaker::GetURLByContentID(
                    'controlpanel-feedback_delete', $x->getId())
            );
        }
        $this->assign('postArray', $a);
    }

}